import React from 'react'
import styles from './styles/spinner'
import cx from 'classnames'

export default React.createClass({

    getInitialState: function() {
        return {
            visible: true
        };
    },

    render: function(){
        const visible = cx({'hide': !this.state.visible})
        return (
            <div className="loading-spinner">
                <div className="lds-css ng-scope">
                    <div className="lds-facebook">
                        <div></div>
                        <div></div>
                        <div></div>
                    </div>
                </div>
            </div>
        );
    },

    hide: function(){
        this.setState({visible: false});
    },

    show: function(){
        this.setState({visible: true});
    }
})
